//
//  CompanyInforCell.m
//  ChengXinBao
//
//  Created by RongZhou on 17/2/17.
//  Copyright © 2017年 RongZhou. All rights reserved.
//

#import "CompanyInforCell.h"
#import "CompanyInfoModel.h"
#import <UIImageView+WebCache.h>
@implementation CompanyInforCell

-(void)setModel:(CompanyInfoModel *)model{
    _model = model;
    NSString *str = [NSString stringWithFormat:@"%@%@",@"http://120.77.213.62:9080/",_model.logo];
    [_iconImageView sd_setImageWithURL:[NSURL URLWithString:str] placeholderImage:[UIImage imageNamed:@""]];
    [self setcoridinesAboutImageView:_iconImageView];
    _addressLabel.text = _model.customerAddr;
    _companyNameLabel.text = _model.customerName;
    _instroduceLabel.text = _model.baseClassify;
    _instroduceLabel.hidden = YES;
}

/**
 *  设置imageview的圆角
 *
 *  @param imageView
 */
-(void)setcoridinesAboutImageView:(UIImageView *)
imageView{
    UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:imageView.bounds byRoundingCorners:UIRectCornerAllCorners cornerRadii:imageView.bounds.size];
    CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
    maskLayer.frame = imageView.bounds;
    maskLayer.path = maskPath.CGPath;
    imageView.layer.mask = maskLayer;
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
